package com.gupaoedu.vip.pattern.singleton.hungry;

/**
* @Author:         Temple
* @Date:           2019/4/16 23:20
* @Version:        1.0
* @Description:    java类作用描述
*/

//饿汉式静态块单例
public class HungryStaticSingleton {
    private static final HungryStaticSingleton hungrySingleton;
    static {
        hungrySingleton = new HungryStaticSingleton();
    }
    private HungryStaticSingleton(){}
    public static HungryStaticSingleton getInstance(){
        return  hungrySingleton;
    }
}
